package com.ruoyi.wms.mapper;

import com.ruoyi.wms.domain.entity.ShipmentOrder;
import com.ruoyi.wms.domain.vo.ShipmentOrderVo;
import com.ruoyi.common.mybatis.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.MapKey;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * 出库单Mapper接口
 *
 * @author zcc
 * @date 2024-08-01
 */
public interface ShipmentOrderMapper extends BaseMapperPlus<ShipmentOrder, ShipmentOrderVo> {
    /**
     * 首页不同出库类型的未出库单数量
     * @return
     */
    @MapKey("optType")
    List<Map<Integer, Integer>> queryUnfinishedShipmentsCount();

    /**
     * 查询出库单趋势统计 按天按月按年
     */
    @MapKey("time")
    List<Map<LocalDateTime, Integer>> queryShipmentOrderTrend(LocalDateTime beginTime, LocalDateTime endTime, Integer granularity, Integer optType, Integer orderStatus);
}
